<%@ page language="java" import="java.util.*,dao.*,entity.*" pageEncoding="UTF-8"%>
<html>
  <head>
    <title>My JSP 'dodelete.jsp' starting page</title>
  </head>
  
  <body>
   <%
   String ids = request.getParameter("id");
   int id = Integer.parseInt(ids);
   ExpoDao dao = new ExpoDao();
   int row = dao.deleteById(id);
   if(row > 0)
   {
      request.setAttribute("msg","<script language='javascript'>alert('删除成功!');</script>");
   }
   else
   {
      request.setAttribute("msg","<script language='javascript'>alert('删除失败!');</script>");
   }
   request.getRequestDispatcher("index.jsp").forward(request,response);
    %>
  </body>
</html>
